Optimal. Leaf size=156 \[ -\frac {\tanh ^{-1}(\cosh (c+d x))}{a^3 d}+\frac {\sqrt {b} \left (15 a^2+20 a b+8 b^2\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \text {sech}(c+d x)}{\sqrt {a+b}}\right )}{8 a^3 (a+b)^{5/2} d}+\frac {b \text {sech}(c+d x)}{4 a (a+b) d \left (a+b-b \text {sech}^2(c+d x)\right )^2}+\frac {b (7 a+4 b) \text {sech}(c+d x)}{8 a^2 (a+b)^2 d \left (a+b-b \text {sech}^2(c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 156, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3745, 425, 541,
536, 213, 214} \begin {gather*} -\frac {\tanh ^{-1}(\cosh (c+d x))}{a^3 d}+\frac {b (7 a+4 b) \text {sech}(c+d x)}{8 a^2 d (a+b)^2 \left (a-b \text {sech}^2(c+d x)+b\right )}+\frac {\sqrt {b} \left (15 a^2+20 a b+8 b^2\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \text {sech}(c+d x)}{\sqrt {a+b}}\right )}{8 a^3 d (a+b)^{5/2}}+\frac {b \text {sech}(c+d x)}{4 a d (a+b) \left (a-b \text {sech}^2(c+d x)+b\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 214
Rule 425
Rule 536
Rule 541
Rule 3745
Rubi steps
\begin {align*} \int \frac {\text {csch}(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^3} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \left (a+b-b x^2\right )^3} \, dx,x,\text {sech}(c+d x)\right )}{d}\\ &=\frac {b \text {sech}(c+d x)}{4 a (a+b) d \left (a+b-b \text {sech}^2(c+d x)\right )^2}+\frac {\text {Subst}\left (\int \frac {4 a+b+3 b x^2}{\left (-1+x^2\right ) \left (a+b-b x^2\right )^2} \, dx,x,\text {sech}(c+d x)\right )}{4 a (a+b) d}\\ &=\frac {b \text {sech}(c+d x)}{4 a (a+b) d \left (a+b-b \text {sech}^2(c+d x)\right )^2}+\frac {b (7 a+4 b) \text {sech}(c+d x)}{8 a^2 (a+b)^2 d \left (a+b-b \text {sech}^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {8 a^2+9 a b+4 b^2+b (7 a+4 b) x^2}{\left (-1+x^2\right ) \left (a+b-b x^2\right )} \, dx,x,\text {sech}(c+d x)\right )}{8 a^2 (a+b)^2 d}\\ &=\frac {b \text {sech}(c+d x)}{4 a (a+b) d \left (a+b-b \text {sech}^2(c+d x)\right )^2}+\frac {b (7 a+4 b) \text {sech}(c+d x)}{8 a^2 (a+b)^2 d \left (a+b-b \text {sech}^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\text {sech}(c+d x)\right )}{a^3 d}+\frac {\left (b \left (15 a^2+20 a b+8 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\text {sech}(c+d x)\right )}{8 a^3 (a+b)^2 d}\\ &=-\frac {\tanh ^{-1}(\cosh (c+d x))}{a^3 d}+\frac {\sqrt {b} \left (15 a^2+20 a b+8 b^2\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \text {sech}(c+d x)}{\sqrt {a+b}}\right )}{8 a^3 (a+b)^{5/2} d}+\frac {b \text {sech}(c+d x)}{4 a (a+b) d \left (a+b-b \text {sech}^2(c+d x)\right )^2}+\frac {b (7 a+4 b) \text {sech}(c+d x)}{8 a^2 (a+b)^2 d \left (a+b-b \text {sech}^2(c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 1.05, size = 236, normalized size = 1.51 \begin {gather*} \frac {\frac {i \sqrt {b} \left (15 a^2+20 a b+8 b^2\right ) \text {ArcTan}\left (\frac {-i \sqrt {a+b}-\sqrt {a} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b}}\right )}{(a+b)^{5/2}}+\frac {i \sqrt {b} \left (15 a^2+20 a b+8 b^2\right ) \text {ArcTan}\left (\frac {-i \sqrt {a+b}+\sqrt {a} \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b}}\right )}{(a+b)^{5/2}}+\frac {8 a^2 b^2 \cosh (c+d x)}{(a+b)^2 (a-b+(a+b) \cosh (2 (c+d x)))^2}+\frac {2 a b (9 a+4 b) \cosh (c+d x)}{(a+b)^2 (a-b+(a+b) \cosh (2 (c+d x)))}+8 \log \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right )}{8 a^3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(303\) vs.
\(2(142)=284\).
time = 3.20, size = 304, normalized size = 1.95
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{3}}-\frac {2 b \left (\frac {-\frac {\left (9 a^{2}+28 a b +16 b^{2}\right ) a \left (\tanh ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 \left (a^{2}+2 a b +b^{2}\right )}-\frac {3 \left (9 a^{3}+30 a^{2} b +40 a \,b^{2}+16 b^{3}\right ) \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 \left (a^{2}+2 a b +b^{2}\right )}-\frac {a \left (27 a^{2}+68 a b +32 b^{2}\right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 \left (a^{2}+2 a b +b^{2}\right )}-\frac {3 a^{2} \left (3 a +2 b \right )}{8 \left (a^{2}+2 a b +b^{2}\right )}}{\left (a \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+4 b \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a \right )^{2}}-\frac {\left (15 a^{2}+20 a b +8 b^{2}\right ) \arctanh \left (\frac {2 a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a +4 b}{4 \sqrt {a b +b^{2}}}\right )}{16 \left (a^{2}+2 a b +b^{2}\right ) \sqrt {a b +b^{2}}}\right )}{a^{3}}}{d}\) | \(304\) |
default | \(\frac {\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{3}}-\frac {2 b \left (\frac {-\frac {\left (9 a^{2}+28 a b +16 b^{2}\right ) a \left (\tanh ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 \left (a^{2}+2 a b +b^{2}\right )}-\frac {3 \left (9 a^{3}+30 a^{2} b +40 a \,b^{2}+16 b^{3}\right ) \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 \left (a^{2}+2 a b +b^{2}\right )}-\frac {a \left (27 a^{2}+68 a b +32 b^{2}\right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 \left (a^{2}+2 a b +b^{2}\right )}-\frac {3 a^{2} \left (3 a +2 b \right )}{8 \left (a^{2}+2 a b +b^{2}\right )}}{\left (a \left (\tanh ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+4 b \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a \right )^{2}}-\frac {\left (15 a^{2}+20 a b +8 b^{2}\right ) \arctanh \left (\frac {2 a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a +4 b}{4 \sqrt {a b +b^{2}}}\right )}{16 \left (a^{2}+2 a b +b^{2}\right ) \sqrt {a b +b^{2}}}\right )}{a^{3}}}{d}\) | \(304\) |
risch | \(\frac {\left (9 a^{2} {\mathrm e}^{6 d x +6 c}+13 a b \,{\mathrm e}^{6 d x +6 c}+4 b^{2} {\mathrm e}^{6 d x +6 c}+27 a^{2} {\mathrm e}^{4 d x +4 c}+11 a b \,{\mathrm e}^{4 d x +4 c}-4 b^{2} {\mathrm e}^{4 d x +4 c}+27 a^{2} {\mathrm e}^{2 d x +2 c}+11 a b \,{\mathrm e}^{2 d x +2 c}-4 b^{2} {\mathrm e}^{2 d x +2 c}+9 a^{2}+13 a b +4 b^{2}\right ) b \,{\mathrm e}^{d x +c}}{4 \left (a^{2}+2 a b +b^{2}\right ) \left (a \,{\mathrm e}^{4 d x +4 c}+b \,{\mathrm e}^{4 d x +4 c}+2 a \,{\mathrm e}^{2 d x +2 c}-2 b \,{\mathrm e}^{2 d x +2 c}+a +b \right )^{2} a^{2} d}+\frac {\ln \left ({\mathrm e}^{d x +c}-1\right )}{a^{3} d}-\frac {\ln \left ({\mathrm e}^{d x +c}+1\right )}{a^{3} d}+\frac {15 \sqrt {b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {b \left (a +b \right )}\, {\mathrm e}^{d x +c}}{a +b}+1\right )}{16 \left (a +b \right )^{3} d a}+\frac {5 \sqrt {b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {b \left (a +b \right )}\, {\mathrm e}^{d x +c}}{a +b}+1\right ) b}{4 \left (a +b \right )^{3} d \,a^{2}}+\frac {\sqrt {b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 \sqrt {b \left (a +b \right )}\, {\mathrm e}^{d x +c}}{a +b}+1\right ) b^{2}}{2 \left (a +b \right )^{3} d \,a^{3}}-\frac {15 \sqrt {b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {b \left (a +b \right )}\, {\mathrm e}^{d x +c}}{a +b}+1\right )}{16 \left (a +b \right )^{3} d a}-\frac {5 \sqrt {b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {b \left (a +b \right )}\, {\mathrm e}^{d x +c}}{a +b}+1\right ) b}{4 \left (a +b \right )^{3} d \,a^{2}}-\frac {\sqrt {b \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 d x +2 c}-\frac {2 \sqrt {b \left (a +b \right )}\, {\mathrm e}^{d x +c}}{a +b}+1\right ) b^{2}}{2 \left (a +b \right )^{3} d \,a^{3}}\) | \(572\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 5783 vs.
\(2 (148) = 296\).
time = 0.56, size = 10716, normalized size = 68.69 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {csch}{\left (c + d x \right )}}{\left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{\mathrm {sinh}\left (c+d\,x\right )\,{\left (b\,{\mathrm {tanh}\left (c+d\,x\right )}^2+a\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________